<?php
include "WeChat.php";

//token数据
define(TOKEN,"weixin1");
//appid和appsecret的数据
$appid = "wxcc20ec64170816e1";
$appsecret = "3f2339cc60aa05a96c5fa8d7acd02e62";

//菜单数据
$data = '{
     "button":[
     {    
          "type":"view",
          "name":"申请会员",
          "url":"https://kan0n.azurewebsites.net/jifen/member/html/member_integral.html"
      },
      {    
          "type":"view",
          "name":"个人中心",
          "url":"http://www.baidu.com"

      }
      
       
     ]
 }';
if(isset($_GET['echostr'])) {
    //token验证
    (new WeChat())->valid();
}else {
    //开始微信功能的操作
    (new WeChat($appid,$appsecret))->menu_create($data);
}



?>